package picture_circle;

public class Rect extends Picture {
    private double length;
    private double width;
    public Rect( double length, double width) {
        this.length = length;
        this.width = width;
    }
    @Override
    public double getPerimeter() {
        return 2 * (length + width);
    }

    @Override
    public double getArea() {
        return length * width;
    }

    @Override
    public void show() {
        System.out.println("矩形信息：长: " + length + ", 宽: " + width);
    }
}
